package com.wc.alorithm_blue_bridge._容斥原理._2023;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
 * @Author congge
 * @Date 2025/4/11 17:33
 * @description
 */

public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 100010, P = 998244353;
    static long[] fact = new long[N], invfact = new long[N];
    static long[] base = new long[N];
    static int n, m;

    public static void main(String[] args) {
        n = sc.nextInt();
        m = sc.nextInt();
        fact[0] = invfact[0] = base[0] = 1;
        for (int i = 1; i <= n; i++) {
            fact[i] = i * fact[i - 1] % P;
            invfact[i] = qmi(i, P - 2) * invfact[i - 1] % P;
            base[i] = base[i - 1] * 10 % P;
        }

        long res = 0;
        for (int i = m; i * 4 <= n; i++) {
            long t = C(i, m) * C(n - 3 * i, n - 4 * i)  % P* base[n - 4 * i] % P;
            if ((i - m & 1) == 0) res = (res + t) % P;
            else res = (res - t + P) % P;
        }
        out.println(res);
        out.flush();
    }

    static long C(int n, int m) {
        return fact[n] * invfact[m] % P * invfact[n - m] % P;
    }

    static long qmi(long a, long b) {
        long res = 1;
        while (b > 0) {
            if((b & 1) == 1) res = res * a % P;
            a = a * a % P;
            b >>= 1;
        }
        return res;
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}